import { NestFactory } from '@nestjs/core';
import { AppModule } from './appModule';
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';

async function bootstrap() {
  const app = await NestFactory.create(AppModule);
  const config = new DocumentBuilder()
    .setTitle('Nest Server')
    .setDescription('The Nest Server API description')
    .setVersion('1.0.0')
    .build()
  const ducument = SwaggerModule.createDocument(app,config)
  SwaggerModule.setup('doc',app,ducument)
  await app.listen(3000, () => {
    console.log('server listen in http://localhost:3000');
  });
}
bootstrap();
